package com.svse.designPattern.behaviour.memento;

/**
 * @author LiYuhang
 * @version 0.1
 * @application
 * @Date 2020/8/9 10:04
 */
public class Originator {
    private String state;

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }
    public Memento createMemento(){
        return new Memento(state);
    }
    public void restoreMemento(Memento memento){
        this.setState(memento.getState());
    }

}
